package edu.ccut.saturn.studio.validate.part;

import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;

/**
 * 表格标签器
 * @author Bai Yucheng
 *
 */
public class TableLabelProvider implements ITableLabelProvider {
	private int rowid = 0;
	
	public Image getColumnImage(Object element, int columnIndex) {
		return null;
	}

	public String getColumnText(Object element, int columnIndex) {
	
		String argsVO = (String)element;
		if (columnIndex == 0) {
			return String.valueOf(++rowid);
		}
		if (columnIndex == 1) {
			return argsVO;
		}
		
		return "";
	}

	public void addListener(ILabelProviderListener listener) {		
	}

	public void dispose() {
	}

	public boolean isLabelProperty(Object element, String property) {
		return false;
	}

	public void removeListener(ILabelProviderListener listener) {
	}

	public void setRowid(int rowid) {
		this.rowid = rowid;
	}
}
